#!/bin/sh
 
i=1
while [ $i -le 5 ]
do
    echo ".................. job begin  ................... $i"
    # ...... call your command here 在这里调用你的命令 ......
    wget http://test.oss.command/mariadb.20180719092337.sql.gz 
    # check and retry   
    if [ $? -eq 0 ]; then
        echo "--------------- job complete ---------------"
        break;
    else
        echo "...............error occur, retry in 5 seconds .........."
        sleep 2
    fi
    ((i++))
done